﻿@model WaiGaoQiaoWeb.Models.ConsumptionPeriodsVM
@{
    ViewBag.Title = "EditConsumptionPeriods";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@section Head
{
    @Html.Css("EditForm")
    <script type="text/javascript" language="javascript">
        $(document).ready(function () {
            $("form").makeValidationInline();
            //保存
            $("#btnSave").click(function (event) {
                if (!$("#fmEdit").valid()) {
                    return false;
                }
                $('#fmEdit').ajaxSubmit(function (callback) {
                    if (callback) {
                        CloseModelWindow(null, true);
                    }
                });
            });
            //关闭
            $("#btnCancel").click(function (e) {
                CloseModelWindow(null, false);
            });
        });   
    </script>

    
}
@using (Html.BeginForm("SaveConsumptionPeriodsEdit", "ConsumptionPeriods", FormMethod.Post, new { id = "fmEdit" }))
{
    @Html.ValidationSummary(true)
    <div id="editFormWrapper">
        @Html.HiddenFor(model => model.PeriodCode)
        <br />
        <div class="editFormItems">
            <div class="editFormLabel">
                时段名称:
            </div>
            <div class="editForm">
                @Html.TextBoxFor(model => model.PeriodName, new { @readonly = true, disabled = "disabled" })
            </div>
        </div>
        <div class="editFormItems">
            <div class="editFormLabel">
                开始时间:
            </div>
            <div class="editForm">
                @Html.TextBoxFor(model => model.BeginTime, new { @class = "Wdate", onfocus = "WdatePicker({vel:'C1SignInTime.BeginTime',dateFmt:'HH:mm'})" })
            </div>
        </div>
        <div class="editFormItems">
            <div class="editFormLabel">
                结束时间:
            </div>
            <div class="editForm">
                @Html.TextBoxFor(model => model.EndTime, new { @class = "Wdate", onfocus = "WdatePicker({vel:'C1SignInTime.ClientID',dateFmt:'HH:mm'})" })
            </div>
        </div>
        <div class="editFormItems">
            <div class="editFormLabel">
                跨天:
            </div>
            <div class="editForm">
                @Html.CheckBoxFor(model => model.blNextDay)
            </div>
        </div>
    </div>
    <div class="buttonpanel">
        <div style="float: right; margin-right: 10px;">
            <a id="btnSave" href="javascript:void(0);" class="button"><span>保存</span></a> <a
                id="btnCancel" href="javascript:void(0);" class="button"><span>关闭</span></a>
        </div>
    </div>
}
